package com.ukao.cashregister.bean;

import android.support.annotation.NonNull;
import android.text.TextUtils;

import com.ukao.cashregister.utils.CheckUtils;

import java.io.Serializable;

/**
 * Created by ukaodev on 2017/5/24.
 */

public class AddClothingItem   extends BaseListBean<AddClothingItem> implements Serializable,Comparable<AddClothingItem>  {


    /**
     * data : [{"code":"1000","firstWord":"XY","sortNo":1,"name":"洗衣","id":15},{"code":"2000","firstWord":"XX","sortNo":2,"name":"洗鞋","id":16},{"code":"3000","firstWord":"JF","sortNo":3,"name":"家纺","id":17},{"code":"4000","firstWord":"PJHL","sortNo":4,"name":"皮具护理","id":18},{"code":"5000","firstWord":"CL","sortNo":5,"name":"窗帘","id":19},{"code":"6000","firstWord":"FZXG","sortNo":6,"name":"服装修改","id":20}]
     * httpCode : 200
     * msg : 请求成功
     * timestamp : 1499074073734
     */




        /**
         * code : 1000
         * firstWord : XY
         * sortNo : 1
         * name : 洗衣
         * id : 15
         */
         private  int  saleDiscount;
        private   int discount;
        private   boolean isCheck = false;
        private String code;
        private String firstWord;
        private int sortNo;
        private String name;
        private String id;
        private  int position;
        private int  price;
        private String   unit;
        private String       saleTypeText;
        private String        typeId;
        private int       isCustomNum;
        private String       unitText;
        private int       saleType;
        private String    unitpice;
        private  String  count;
        private  String    TotalServiceDescMoney;
        private  String   selectDesc; /*附件*/
        private  String  count100;
    public   AddClothingItem(  ){

    }

    public AddClothingItem(String id,String name) {
        this.name = name;
        this.id = id;
    }

    public   AddClothingItem(boolean  isCheck){
        this.isCheck=isCheck;
    }
        public String getTotalServiceDescMoney() {
            return TotalServiceDescMoney;
        }

        public void setTotalServiceDescMoney(String totalServiceDescMoney) {
            TotalServiceDescMoney = totalServiceDescMoney;
        }

        public int getDiscount() {
            return saleDiscount;
        }

        public void setDiscount(int discount) {
            this.discount = discount;
        }

        public String getSelectDesc() {
            return selectDesc;
        }

        public void setSelectDesc(String selectDesc) {
            this.selectDesc = selectDesc;
        }



        public String getCount() {
            return count;
        }

        public void setCount(String count) {
            this.count = count;
        }



        public void setUnitText(String unitText) {
            this.unitText = unitText;
        }

        public void setUnitpice(String unitpice) {
            this.unitpice = unitpice;
        }


        public String getCount100() {
            return count100;
        }

        public void setCount100(String count100) {
            this.count100 = count100;
        }

        public String getUnitpice() {
            return unitpice;
        }

        public String getPrice() {

            return   CheckUtils.isEmptyNumber(price);
        }

        public String getUnit() {
            return unit;
        }

        public String getSaleTypeText() {
            return saleTypeText;
        }

        public String getTypeId() {
            return typeId;
        }

        public int getIsCustomNum() {
            return isCustomNum;   // 衣物里面isCustomNum =1
        }

        public String getUnitText() {
            return unitText; //单位
        }

        public int getSaleType() {
            return saleType;
        }

        private   String  businessId;


        public String getBusinessId() {
            return businessId;
        }

        public String getCode() {
            return code;
        }

        public int getPosition() {
            return position;
        }

        public void setPosition(int position) {
            this.position = position;
        }

        public boolean isCheck() {
            return isCheck;
        }

        public void setCheck(boolean check) {
            isCheck = check;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getFirstWord() {

            return CheckUtils.isEmptyString(firstWord);
        }

        public void setFirstWord(String firstWord) {
            this.firstWord = firstWord;
        }

        public int getSortNo() {
            return sortNo;
        }

        public void setSortNo(int sortNo) {
            this.sortNo = sortNo;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }


        @Override
        public int compareTo(@NonNull AddClothingItem item) {
            return (this.id.compareTo(item.getId()));
        }

    @Override
    public boolean equals(Object obj) {
        AddClothingItem item =  (AddClothingItem)obj;
        return this.id.equals(item.getId());
    }
}
